home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- ############################################################################
- # Copyright (C) 2006 by Patrick J. Verner #
- # exodusrobot@yahoo.com #
- # #
- # This program is free software; you can redistribute it and/or modify #
- # it under the terms of the GNU General Public License as published by #
- # the Free Software Foundation; either version 2 of the License, or #
- # (at your option) any later version. #
- ############################################################################
-
- #make sure temp exists
- temp=/tmp/xres
- temp1=/tmp/xres
- if [ ! -d $temp1 ]
- then
- mkdir -p $temp1
- chmod 700 $temp1
- fi
-
- #remove X config
- if [ -f /root/X ]
- then
- rm /root/X
- fi
-
- #**********main menu**********
- item="1024x768"
- while [ 0 ]
- do
- dialog --title "GParted LiveCD XRES" --default-item "$item" --backtitle "GParted Livecd" --menu "Select your screen resolution:" 13 40 7 \
- "640x480" "" \
- "800x600" "" \
- "1024x768" "" \
- "1280x800" "" \
- "1280x1024" "" \
- "1400x1050" "" \
- "1600x1200" "" \
- 2> $temp1/return
- if [ ! $? = 0 ]
- then
- break
- fi
- REPLY=`cat $temp1/return`
- rm -f $temp1/return
-
- #640x480
- if [ "$REPLY" = "640x480" ]
- then
- cat > /root/X << "EOF"
- #!/bin/sh
- exec /usr/bin/X11/Xvesa -screen 640x480x\
- EOF
- chmod a+rwx /root/X
- cat >> /root/.fluxbox/apps << "EOF"
- [startup] {gparted}
- [app] (gparted)
- [Dimensions] {635 452}
- [Position] (UPPERLEFT) {0 0}
- [Close] {yes}
- [end]
- EOF
- break
- fi
-
- #800x600
- if [ "$REPLY" = "800x600" ]
- then
- cat > /root/X << "EOF"
- #!/bin/sh
- exec /usr/bin/X11/Xvesa -screen 800x600x\
- EOF
- chmod a+rwx /root/X
- cat >> /root/.fluxbox/apps << "EOF"
- [startup] {gparted}
- [app] (gparted)
- [Dimensions] {795 574}
- [Position] (UPPERLEFT) {0 0}
- [Close] {yes}
- [end]
- EOF
- break
- fi
-
- #1024x768
- if [ "$REPLY" = "1024x768" ]
- then
- cat > /root/X << "EOF"
- #!/bin/sh
- exec /usr/bin/X11/Xvesa -screen 1024x768x\
- EOF
- chmod a+rwx /root/X
- cat >> /root/.fluxbox/apps << "EOF"
- [startup] {gparted}
- [app] (gparted)
- [Dimensions] {1019 740}
- [Position] (UPPERLEFT) {0 0}
- [Close] {yes}
- [end]
- EOF
- break
- fi
-
- #1280x800
- if [ "$REPLY" = "1280x800" ]
- then
- cat > /root/X << "EOF"
- #!/bin/sh
- exec /usr/bin/X11/Xvesa -screen 1280x800x\
- EOF
- chmod a+rwx /root/X
- cat >> /root/.fluxbox/apps << "EOF"
- [startup] {gparted}
- [app] (gparted)
- [Dimensions] {1275 740}
- [Position] (UPPERLEFT) {0 0}
- [Close] {yes}
- [end]
- EOF
- break
- fi
-
- #1280x1024
- if [ "$REPLY" = "1280x1024" ]
- then
- cat > /root/X << "EOF"
- #!/bin/sh
- exec /usr/bin/X11/Xvesa -screen 1280x1024x\
- EOF
- chmod a+rwx /root/X
- cat >> /root/.fluxbox/apps << "EOF"
- [startup] {gparted}
- [app] (gparted)
- [Dimensions] {1275 996}
- [Position] (UPPERLEFT) {0 0}
- [Close] {yes}
- [end]
- EOF
- break
- fi
-
- #1400x1050
- if [ "$REPLY" = "1400x1050" ]
- then
- cat > /root/X << "EOF"
- #!/bin/sh
- exec /usr/bin/X11/Xvesa -screen 1400x1050x\
- EOF
- chmod a+rwx /root/X
- cat >> /root/.fluxbox/apps << "EOF"
- [startup] {gparted}
- [app] (gparted)
- [Position] (UPPERLEFT) {0 0}
- [Close] {yes}
- [end]
- EOF
- break
- fi
-
- #1600x1200
- if [ "$REPLY" = "1600x1200" ]
- then
- cat > /root/X << "EOF"
- #!/bin/sh
- exec /usr/bin/X11/Xvesa -screen 1600x1200x\
- EOF
- chmod a+rwx /root/X
- cat >> /root/.fluxbox/apps << "EOF"
- [startup] {gparted}
- [app] (gparted)
- [Position] (UPPERLEFT) {0 0}
- [Close] {yes}
- [end]
- EOF
- break
- fi
- done